package per.jerry.flightinformation.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;


public class FlightTickets {
	private int tid;
	private int flightId;
	//按照指定格式解析日期类型
	@DateTimeFormat(pattern="yy-MM-dd")
	private Date flightDate;
	private double ticketPrice;
	@NotNull(message="售票公司不能为空！")
	private String sellCompany;

	public FlightTickets() {
		super();
	}

	public int getTid() {
		return tid;
	}

	public void setTid(int tid) {
		this.tid = tid;
	}

	public int getFlightId() {
		return flightId;
	}

	public void setFlightId(int flightId) {
		this.flightId = flightId;
	}

	public Date getFlightDate() {
		return flightDate;
	}

	public void setFlightDate(Date flightDate) {
		this.flightDate = flightDate;
	}

	public double getTicketPrice() {
		return ticketPrice;
	}

	public void setTicketPrice(double ticketPrice) {
		this.ticketPrice = ticketPrice;
	}

	public String getSellCompany() {
		return sellCompany;
	}

	public void setSellCompany(String sellCompany) {
		this.sellCompany = sellCompany;
	}

	@Override
	public String toString() {
		return "FlightTickets [tid=" + tid + ", flightId=" + flightId + ", flightDate=" + flightDate + ", ticketPrice="
				+ ticketPrice + ", sellCompany=" + sellCompany + "]";
	}
	
}
